var tabs=document.getElementById("tabs").getElementsByTagName("li");
var lists = document.getElementById("lists").getElementsByTagName("ul");
for(var i=0;i<tabs.length;i++)
{
    tabs[i].onclick=showlist;
}




function showlist(){
    for(var j=0;j<tabs.length;j++)
    {
        if(tabs[j] === this)
        {
            tabs[j].className = "active";
            lists[j].className="clearfix active";
        }
        else{
            tabs[j].className = "";
            lists[j].className="clearfix";
        }
    }

}
var seckillnav = document.getElementById("seckill-nav");
window.onscroll = function(){
    var scrollTop = document.documentElement.scrollTop || document.body.scrollTop || window.pageYOffset;
    if(scrollTop >=260){
        seckillnav.className= "seckill-nav seckill-navfixed";
    }else{
        seckillnav.className= "seckill-nav";
    }
    console.log(scrollTop);
}